<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../core/include.inc.jsp"%>

<form id="pagerForm" method="post" action="block_list">
    <input type="hidden" name="pageNum" value="${pageModel.pageNum}" />
    <input type="hidden" name="numPerPage" value="${pageModel.numPerPage}" />
    <input type="hidden" name="blockName" value="${block.blockName}" />
    <input type="hidden" name="blockTel" value="${block.blockTel}" />
</form>

<form onsubmit="return navTabSearch(this);" action="block_list" method="post">
<div class="pageHeader">
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    <label>小区名称</label>
                    <input type="text" name="blockName" value="${block.blockName}" class="textInput" />
                </li>
                <li>
                    <label>手机号</label>
                    <input type="text" name="blockTel" value="${block.blockTel}" class="textInput" />
                </li>
            </ul>
            <div class="subBar">
                <ul>
                    <li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
                </ul>
            </div>
        </div>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a class="add" href="to_block_add" target="dialog" rel="to_block_add"
                   width="600" height="450" mask="true"><span>添加</span></a></li>
            <li class="line">line</li>
            <li><a class="edit" href="to_block_edit?id={item_id}" target="dialog" rel="to_block_edit"
                   width="600" height="450" mask="true"><span>修改</span></a></li>
            <li class="line">line</li>
            <li><a class="delete" href="block_delete?id={item_id}" target="ajaxTodo" title="确定删除？"><span>删除</span></a></li>
            <li class="line">line</li>

            <li><a class="add" href="to_block_import" target="dialog" rel="to_block_import"
                   width="400" height="200" mask="true"><span>批量导入</span></a></li>
            <li class="line">line</li>

            <li><a class="add" href="block_export?blockName=${block.blockName}&blockTel=${block.blockTel}"
                   target="_blank"><span>导出</span></a></li>
            <li class="line">line</li>

            <li><a class="icon" href="assets/template/block.xlsx" target="_blank"><span>下载模板</span></a></li>
            <li class="line">line</li>

        </ul>
    </div>
    <table class="table" width="100%" layoutH="137">
        <thead>
        <tr>
            <th>序号</th>
            <th>小区名称</th>
            <th>地址</th>
            <th>区县</th>
            <th>管理员</th>
            <th>联系电话</th>
            <th>小区热线</th>
            <th>图片</th>
            <th>创建时间</th>
        </tr>
        </thead>
        <tbody>
            <c:forEach var="item" items="${list}" varStatus="st">
                <tr target="item_id" rel="${item.id}" ondblclick="tableclick()">
                    <td>${st.index+1}</td>
                    <td>${item.blockName}</td>
                    <td>${item.blockAddr}</td>
                    <td>${item.blockArea}</td>
                    <td>${item.blockManager}</td>
                    <td>${item.blockTel}</td>
                    <td>${item.telephone}</td>
                    <td>
                        <c:if test="${item.blockImge != '' and item.blockImge != null}">
                            <a href="image_list?url=${item.blockImge}" target="navTab">查看图片</a>
                        </c:if>
                    </td>
                    <td>
                        <fmt:formatDate value="${item.createTime}" pattern="yyyy-MM-dd"/>
                    </td>
                </tr>
            </c:forEach>
        </tbody>
    </table>

    <c:import url="../core/pagebar.inc.jsp" />

</div>
</form>


